<!DOCTYPE html>
<!-- 模态窗口编辑模板 -->
<form action="" id="myform" class="form-horizontal form-bordered" novalidate="novalidate" method="post">
<!-- 窗口标题开始 -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	<h4 class="modal-title" style="font-weight:bold;">发送短信</h4>
</div>
<!-- 窗口标题结束-->
<!-- 内容开始 -->
<div class="modal-body">
	<div class="portlet-body form">
		<form role="form" class="form-horizontal" id="myForm">
			<div class="form-body">
				<div class="form-group form-md-radios">
					<div >
						<table class="ttTblNoBorder">
							<tr>
								<td>联系人</td>
								<td><input  style="width:450px;padding:.2em .5em;" id="phones"  value="${phones!''}"  readonly="readonly"/></td>
							</tr>
							<tr>
								<td>内容</td>
								<td><textarea rows=5 cols=61 id="Context" ></textarea></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<!-- 内容结束 -->
<!-- 底部按钮开始 -->
<div class="modal-footer">
	<button type="button" class="btn default fa fa-times" data-dismiss="modal"> 取消</button>
	<button type="button" onclick="changeParent()" class="btn green  fa fa-check"> 添加</button>
</div>
<!-- 结束 -->
</form>
<!-- 业务处理开始 -->
<script>
	function changeParent(){
		$.post("sendPurchaseSMS.do",{
			"phones":$("#phones").val(), 
			"context":$("#Context").val()
			},function(data){
			if(data == "success"){
				alert("发送成功!");
				$(".close").click();
			}else{
				alert("发送失败!");
			}
		});
	}
	
</script>